#include <map>
#include <string>
#include <iostream>
#include <list>
#include <algorithm>
#include <vector>
#include <iterator>
#include <cstddef>
#include <array>


using namespace std;

class Base {
public:
	virtual ~Base() = default;
};


class MoveClass : public Base
{
public:
	MoveClass(size_t ss) : _size(ss) {
		cout << "Constructor\n";
		_name = "jintao";
	}
	~MoveClass()
	{
		cout << "destroying \n";
		cout << _size << _name << endl;
	}


	MoveClass(MoveClass && a) = default;
	MoveClass &operator=(MoveClass &&a) = default;
	//MoveClass &operator=(const MoveClass&a) = delete;

private:
	size_t _size;
	string _name;

};

class iBase
{
public:
	iBase(int i) : _data(i) {}
	iBase() : _data(0) {}
	int GetData() { return _data; }

public:

	int _data;
};

class DBase : public iBase
{
public:
	using iBase::iBase;
	using iBase::_data;
	void Print()
	{
		cout << GetData() <<endl;
	}

};

template <typename it>
auto fnct(it begin, it end) -> typename remove_pointer<decltype(begin)>::type
{
	return *begin;
}


//template <typename T>
void print_arg()
{
	cout << "end "<<endl;
}

//rvalue deduce
template<typename T, typename ...Args>
void print_arg(T&& head, Args&& ...arg)
{
	cout << head << " ";
	print_arg(std::forward<Args>(arg)...);
}





int main(int argc, char const *argv[])
{
	print_arg(10, "jintao", 9);


	return 0;
}
